<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <title>tango.util.collection.HashSet</title>
  <link href="./css/style.css" rel="stylesheet" type="text/css"/>
  <!-- <link href="./img/icon.png" rel="icon" type="image/png"/> -->
  <script type="text/javascript" src="./js/jquery.js"></script>
  <script type="text/javascript" src="./js/modules.js"></script>
  <script type="text/javascript" src="./js/quicksearch.js"></script>
  <script type="text/javascript" src="./js/navigation.js"></script>
  <!--<script type="text/javascript" src="./js/jquery.treeview.js"></script>-->
  <script type="text/javascript">
    var g_moduleFQN = "tango.util.collection.HashSet";
  </script>
  
</head>
<body>
<div id="content">
  <h1><a href="./htmlsrc/tango.util.collection.HashSet.html" class="symbol">tango.util.collection.HashSet</a></h1>
  
<dl>
<dt class="decl">class <a class="symbol _class" name="HashSet" href="./htmlsrc/tango.util.collection.HashSet.html#L39" kind="class" beg="39" end="551">HashSet</a><span class="tparams">(T)</span> : SetCollection!(T), HashParams; <a title="Permalink to this symbol" href="#HashSet" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.collection.HashSet.html#L39">#</a></dt>
<dd class="ddef">
<div class="summary">Hash table implementation of set</div>
<p class="sec_header">Author:</p>Doug Lea
 @version 0.93
<p class="bl"/>
 <P> For an introduction to this package see <A HREF="index.html"> Overview </A>.
<dl>
<dt class="decl">LLCellT table[] <a class="symbol _variable" name="HashSet.table" href="./htmlsrc/tango.util.collection.HashSet.html#L52" kind="variable" beg="52" end="52">table</a>; <span class="attrs">[<span class="prot">private</span>]</span> <a title="Permalink to this symbol" href="#HashSet.table" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.collection.HashSet.html#L52">#</a></dt>
<dd class="ddef">
<div class="summary">The table. Each entry is a list. Null if no table allocated</div></dd>
<dt class="decl">float <a class="symbol _variable" name="HashSet.loadFactor" href="./htmlsrc/tango.util.collection.HashSet.html#L56" kind="variable" beg="56" end="56">loadFactor</a>; <span class="attrs">[<span class="prot">private</span>]</span> <a title="Permalink to this symbol" href="#HashSet.loadFactor" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.collection.HashSet.html#L56">#</a></dt>
<dd class="ddef">
<div class="summary">The threshold load factor</div></dd>
<dt class="decl"><a class="symbol _ctor" name="HashSet.this" href="./htmlsrc/tango.util.collection.HashSet.html#L65" kind="ctor" beg="65" end="68">this</a><span class="params">()</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#HashSet.this" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.collection.HashSet.html#L65">#</a></dt>
<dd class="ddef">
<div class="summary">Make an empty HashedSet.</div></dd>
<dt class="decl"><a class="symbol _ctor" name="HashSet.this:2" href="./htmlsrc/tango.util.collection.HashSet.html#L74" kind="ctor" beg="74" end="77">this</a><span class="params">(Predicate <em>screener</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#HashSet.this:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.collection.HashSet.html#L74">#</a></dt>
<dd class="ddef">
<div class="summary">Make an empty HashedSet using given element screener</div></dd>
<dt class="decl"><a class="symbol _ctor" name="HashSet.this:3" href="./htmlsrc/tango.util.collection.HashSet.html#L83" kind="ctor" beg="83" end="88">this</a><span class="params">(Predicate <em>s</em>, float <em>f</em>)</span>; <span class="attrs">[<span class="prot">protected</span>]</span> <a title="Permalink to this symbol" href="#HashSet.this:3" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.collection.HashSet.html#L83">#</a></dt>
<dd class="ddef">
<div class="summary">Special version of constructor needed by clone()</div></dd>
<dt class="decl">HashSet!(T) <a class="symbol _function" name="HashSet.duplicate" href="./htmlsrc/tango.util.collection.HashSet.html#L94" kind="function" beg="94" end="110">duplicate</a><span class="params">()</span>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">final</span>]</span> <a title="Permalink to this symbol" href="#HashSet.duplicate" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.collection.HashSet.html#L94">#</a></dt>
<dd class="ddef">
<div class="summary">Make an independent copy of the table. Does not clone elements.</div></dd>
<dt class="decl">int <a class="symbol _function" name="HashSet.buckets" href="./htmlsrc/tango.util.collection.HashSet.html#L121" kind="function" beg="121" end="124">buckets</a><span class="params">()</span>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">final</span>]</span> <a title="Permalink to this symbol" href="#HashSet.buckets" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.collection.HashSet.html#L121">#</a></dt>
<dd class="ddef">
<div class="summary">Implements tango.util.collection.HashTableParams.buckets.
 Time complexity: O(1).</div>
<p class="sec_header">See Also:</p>tango.util.collection.HashTableParams.buckets.</dd>
<dt class="decl">void <a class="symbol _function" name="HashSet.buckets:2" href="./htmlsrc/tango.util.collection.HashSet.html#L132" kind="function" beg="132" end="144">buckets</a><span class="params">(int <em>newCap</em>)</span>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">final</span>]</span> <a title="Permalink to this symbol" href="#HashSet.buckets:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.collection.HashSet.html#L132">#</a></dt>
<dd class="ddef">
<div class="summary">Implements tango.util.collection.HashTableParams.buckets.
 Time complexity: O(n).</div>
<p class="sec_header">See Also:</p>tango.util.collection.HashTableParams.buckets.</dd>
<dt class="decl">float <a class="symbol _function" name="HashSet.thresholdLoadFactor" href="./htmlsrc/tango.util.collection.HashSet.html#L152" kind="function" beg="152" end="155">thresholdLoadFactor</a><span class="params">()</span>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">final</span>]</span> <a title="Permalink to this symbol" href="#HashSet.thresholdLoadFactor" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.collection.HashSet.html#L152">#</a></dt>
<dd class="ddef">
<div class="summary">Implements tango.util.collection.HashTableParams.thresholdLoadfactor
 Time complexity: O(1).</div>
<p class="sec_header">See Also:</p>tango.util.collection.HashTableParams.thresholdLoadfactor</dd>
<dt class="decl">void <a class="symbol _function" name="HashSet.thresholdLoadFactor:2" href="./htmlsrc/tango.util.collection.HashSet.html#L163" kind="function" beg="163" end="172">thresholdLoadFactor</a><span class="params">(float <em>desired</em>)</span>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">final</span>]</span> <a title="Permalink to this symbol" href="#HashSet.thresholdLoadFactor:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.collection.HashSet.html#L163">#</a></dt>
<dd class="ddef">
<div class="summary">Implements tango.util.collection.HashTableParams.thresholdLoadfactor
 Time complexity: O(n).</div>
<p class="sec_header">See Also:</p>tango.util.collection.HashTableParams.thresholdLoadfactor</dd>
<dt class="decl">bool <a class="symbol _function" name="HashSet.contains" href="./htmlsrc/tango.util.collection.HashSet.html#L185" kind="function" beg="185" end="195">contains</a><span class="params">(T <em>element</em>)</span>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">final</span>]</span> <a title="Permalink to this symbol" href="#HashSet.contains" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.collection.HashSet.html#L185">#</a></dt>
<dd class="ddef">
<div class="summary">Implements tango.util.collection.impl.Collection.Collection.contains
 Time complexity: O(1) average; O(n) worst.</div>
<p class="sec_header">See Also:</p>tango.util.collection.impl.Collection.Collection.contains</dd>
<dt class="decl">uint <a class="symbol _function" name="HashSet.instances" href="./htmlsrc/tango.util.collection.HashSet.html#L202" kind="function" beg="202" end="208">instances</a><span class="params">(T <em>element</em>)</span>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">final</span>]</span> <a title="Permalink to this symbol" href="#HashSet.instances" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.collection.HashSet.html#L202">#</a></dt>
<dd class="ddef">
<div class="summary">Implements tango.util.collection.impl.Collection.Collection.instances
 Time complexity: O(n).</div>
<p class="sec_header">See Also:</p>tango.util.collection.impl.Collection.Collection.instances</dd>
<dt class="decl">GuardIterator!(T) <a class="symbol _function" name="HashSet.elements" href="./htmlsrc/tango.util.collection.HashSet.html#L215" kind="function" beg="215" end="218">elements</a><span class="params">()</span>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">final</span>]</span> <a title="Permalink to this symbol" href="#HashSet.elements" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.collection.HashSet.html#L215">#</a></dt>
<dd class="ddef">
<div class="summary">Implements tango.util.collection.impl.Collection.Collection.elements
 Time complexity: O(1).</div>
<p class="sec_header">See Also:</p>tango.util.collection.impl.Collection.Collection.elements</dd>
<dt class="decl">int <a class="symbol _function" name="HashSet.opApply" href="./htmlsrc/tango.util.collection.HashSet.html#L225" kind="function" beg="225" end="229">opApply</a><span class="params">(int delegate (inout T value) <em>dg</em>)</span>; <a title="Permalink to this symbol" href="#HashSet.opApply" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.collection.HashSet.html#L225">#</a></dt>
<dd class="ddef">
<div class="summary">Implements tango.util.collection.model.View.View.opApply
 Time complexity: O(n).</div>
<p class="sec_header">See Also:</p>tango.util.collection.model.View.View.opApply</dd>
<dt class="decl">void <a class="symbol _function" name="HashSet.clear" href="./htmlsrc/tango.util.collection.HashSet.html#L238" kind="function" beg="238" end="242">clear</a><span class="params">()</span>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">final</span>]</span> <a title="Permalink to this symbol" href="#HashSet.clear" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.collection.HashSet.html#L238">#</a></dt>
<dd class="ddef">
<div class="summary">Implements tango.util.collection.impl.Collection.Collection.clear.
 Time complexity: O(1).</div>
<p class="sec_header">See Also:</p>tango.util.collection.impl.Collection.Collection.clear</dd>
<dt class="decl">void <a class="symbol _function" name="HashSet.removeAll" href="./htmlsrc/tango.util.collection.HashSet.html#L249" kind="function" beg="249" end="252">removeAll</a><span class="params">(T <em>element</em>)</span>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">final</span>]</span> <a title="Permalink to this symbol" href="#HashSet.removeAll" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.collection.HashSet.html#L249">#</a></dt>
<dd class="ddef">
<div class="summary">Implements tango.util.collection.impl.Collection.Collection.exclude.
 Time complexity: O(1) average; O(n) worst.</div>
<p class="sec_header">See Also:</p>tango.util.collection.impl.Collection.Collection.exclude</dd>
<dt class="decl">T <a class="symbol _function" name="HashSet.take" href="./htmlsrc/tango.util.collection.HashSet.html#L311" kind="function" beg="311" end="329">take</a><span class="params">()</span>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">final</span>]</span> <a title="Permalink to this symbol" href="#HashSet.take" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.collection.HashSet.html#L311">#</a></dt>
<dd class="ddef">
<div class="summary">Implements tango.util.collection.impl.Collection.Collection.take.
 Time complexity: O(number of buckets).</div>
<p class="sec_header">See Also:</p>tango.util.collection.impl.Collection.Collection.take</dd>
<dt class="decl">void <a class="symbol _function" name="HashSet.add" href="./htmlsrc/tango.util.collection.HashSet.html#L339" kind="function" beg="339" end="357">add</a><span class="params">(T <em>element</em>)</span>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">final</span>]</span> <a title="Permalink to this symbol" href="#HashSet.add" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.collection.HashSet.html#L339">#</a></dt>
<dd class="ddef">
<div class="summary">Implements tango.util.collection.impl.SetCollection.SetCollection.add.
 Time complexity: O(1) average; O(n) worst.</div>
<p class="sec_header">See Also:</p>tango.util.collection.impl.SetCollection.SetCollection.add</dd>
<dt class="decl">void <a class="symbol _function" name="HashSet.checkLoadFactor" href="./htmlsrc/tango.util.collection.HashSet.html#L369" kind="function" beg="369" end="386">checkLoadFactor</a><span class="params">()</span>; <span class="attrs">[<span class="prot">protected</span>, <span class="stc">final</span>]</span> <a title="Permalink to this symbol" href="#HashSet.checkLoadFactor" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.collection.HashSet.html#L369">#</a></dt>
<dd class="ddef">
<div class="summary">Check to see if we are past load factor threshold. If so, resize
 so that we are at half of the desired threshold.
 Also while at it, check to see if we are empty so can just
 unlink table.</div></dd>
<dt class="decl">int <a class="symbol _function" name="HashSet.hashOf" href="./htmlsrc/tango.util.collection.HashSet.html#L393" kind="function" beg="393" end="396">hashOf</a><span class="params">(T <em>element</em>)</span>; <span class="attrs">[<span class="prot">protected</span>, <span class="stc">final</span>]</span> <a title="Permalink to this symbol" href="#HashSet.hashOf" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.collection.HashSet.html#L393">#</a></dt>
<dd class="ddef">
<div class="summary">Mask off and remainder the hashCode for element
 so it can be used as table index</div></dd>
<dt class="decl">void <a class="symbol _function" name="HashSet.resize" href="./htmlsrc/tango.util.collection.HashSet.html#L402" kind="function" beg="402" end="424">resize</a><span class="params">(int <em>newCap</em>)</span>; <span class="attrs">[<span class="prot">protected</span>, <span class="stc">final</span>]</span> <a title="Permalink to this symbol" href="#HashSet.resize" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.collection.HashSet.html#L402">#</a></dt>
<dd class="ddef">
<div class="summary">resize table to new capacity, rehashing all elements</div></dd>
<dt class="decl">void <a class="symbol _function" name="HashSet.checkImplementation" href="./htmlsrc/tango.util.collection.HashSet.html#L479" kind="function" beg="479" end="503">checkImplementation</a><span class="params">()</span>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">override</span>]</span> <a title="Permalink to this symbol" href="#HashSet.checkImplementation" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.collection.HashSet.html#L479">#</a></dt>
<dd class="ddef">
<div class="summary">Implements tango.util.collection.model.View.View.checkImplementation.</div>
<p class="sec_header">See Also:</p>tango.util.collection.model.View.View.checkImplementation</dd>
<dt class="decl">class <a class="symbol _class" name="HashSet.CellIterator" href="./htmlsrc/tango.util.collection.HashSet.html#L514" kind="class" beg="514" end="550">CellIterator</a><span class="tparams">(T)</span> : AbstractIterator!(T); <a title="Permalink to this symbol" href="#HashSet.CellIterator" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.collection.HashSet.html#L514">#</a></dt>
<dd class="ddef">
<div class="summary">opApply() has migrated here to mitigate the virtual call
                on method get()</div>
</dd></dl></dd></dl>
</div>
<div id="footer">
  <p></p>
  <p>Page generated by <a href="http://code.google.com/p/dil">dil</a> on Fri Dec 26 04:04:08 2008. Rendered by <a href="http://code.google.com/p/dil/wiki/Kandil">kandil</a>.</p>
</div>
</body>
</html>